
execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:0b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:0b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:0b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 0

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:1b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:1b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:1b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 1

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:2b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:2b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:2b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 2

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:3b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:3b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:3b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 3

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:4b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:4b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:4b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 4

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:5b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:5b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:5b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 5

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:6b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:6b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:6b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 6

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:7b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:7b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:7b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 7

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:8b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:8b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:8b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 8

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:9b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:9b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:9b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 9

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:10b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:10b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:10b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 10

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:11b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:11b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:11b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 11

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:12b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:12b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:12b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 12

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:13b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:13b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:13b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 13

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:14b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:14b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:14b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 14

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:15b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:15b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:15b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 15

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:16b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:16b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:16b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 16

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:17b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:17b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:17b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 17

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:18b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:18b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:18b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 18

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:19b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:19b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:19b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 19

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:20b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:20b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:20b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 20

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:21b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:21b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:21b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 21

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:22b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:22b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:22b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 22

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:23b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:23b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:23b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 23

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:24b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:24b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:24b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 24

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:25b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:25b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:25b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 25

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:26b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:26b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:26b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 26

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:27b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:27b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:27b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 27

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:28b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:28b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:28b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 28

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:29b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:29b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:29b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 29

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:30b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:30b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:30b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 30

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:31b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:31b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:31b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 31

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:32b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:32b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:32b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 32

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:33b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:33b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:33b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 33

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:34b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:34b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:34b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 34

execute if score @s advm_battery_swapper_available matches -1 if data entity @s Inventory[{Slot:35b}].tag.battery store result score @s advm_battery_swapper_temp1 run data get entity @s Inventory[{Slot:35b}].tag.battery
execute if score @s advm_battery_swapper_temp1 matches 1 if data entity @s Inventory[{Slot:35b}].tag.battery run scoreboard players set @s advm_battery_swapper_available 35
